<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>spring-security-rbac-demo</title>
    <#include "common.ftl">
</head>
<body class="easyui-layout">
<div data-options="region:'north',border:false" style="height:80px;background:#B3DFDA;padding:10px"><h2>Spring Security
    RABC Demo</h2></div>
<div data-options="region:'west',split:true,title:'West'" style="width:250px;padding:10px;">
    <ul id="menu">
    </ul>
</div>
<div data-options="region:'east',split:true,collapsed:true,title:'East'" style="width:100px;padding:10px;">east region
</div>
<div data-options="region:'south',border:false" style="height:50px;background:#A9FACD;padding:10px;">
    个人项目:ou_yang@foxmail.com
</div>
<div data-options="region:'center',border:false">
    <div id="tab">
    </div>
</div>
</body>
<script>
    $(function () {
        $.put = function (url, data, success) {
            $.ajax({
                type: 'PUT',
                url: url,
                data: data,
                success: success
            });
        };
        $('#menu').tree({
            data: [{
                text: '用户管理',
                view: 'user/index'
            }, {
                text: '角色管理',
                view: 'role/index'
            }, {
                text: '权限管理',
                view: 'authority/index'
            }],
            onClick: function (node) {
                if ($('#tab').tabs('exists', node.text)) {
                    $('#tab').tabs('select', node.text);
                } else {
                    $('#tab').tabs('add', {
                        title: node.text,
                        href: node.view,
                        closable: true
                    });
                }
            }
        });
        $('#tab').tabs({
            border: false,
            onSelect: function (title) {
            }
        });

    });

</script>
</html>